package com.quwan.manager.controller;


import com.quwan.common.result.ApiResult;
import com.quwan.common.result.PageResult;
import com.quwan.manager.controller.dto.RechargeVipDTO;
import com.quwan.manager.service.RechargeVipService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDate;

@Api(tags = "后台管理接口")
@RestController("rechargeVip")
@RequiredArgsConstructor
@RequestMapping("mgr")
public class TRechargeVipController {
    private final RechargeVipService rechargeVipService;

    @ApiOperation("充值会员列表")
    @PostMapping("rechargeVip/users")
    public ApiResult<PageResult<RechargeVipDTO>> members(@ApiParam(value = "页码，1开始，默认1") @RequestParam(required = false, defaultValue = "1") int page,
                                                    @ApiParam(value = "页大小，默认10") @RequestParam(required = false, defaultValue = "2") int size,
                                                    @ApiParam(value = "用户名") @RequestParam(required = false) String nikeName,
                                                    @ApiParam(value = "真实姓名") @RequestParam(required = false) String name,

                                                    @ApiParam(value = "会员Id") @RequestParam(required = false) Long mId

                                                    ) {
        return ApiResult.success(rechargeVipService.users(page, size, nikeName, null, null, null, null, null, null, name, null,mId,null));
    }
}
